package com.he.principles.DIP.before;

import lombok.Builder;
import lombok.Data;

/**
 * @description: TODO
 * @Author: HCL
 * @Date: 2024/8/22 11:29
 */
@Builder
@Data
public class Computer {

    //将电脑配件组装在一起
    private XiJieHardDisk hardDisk;

    private IntelCpu cpu;

    private KingstonMemory memory;


    public void run(){
        System.out.println("运行计算机");
        String data = hardDisk.getHardDisk();
        System.out.println("从硬盘读取到的数据："+data);
        cpu.run();
        memory.save();
    }
}
